package com.grouppurchase.service;

import com.grouppurchase.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;

public interface UserService extends IService<User> {
    
    User findByOpenid(String openid);
    
    User createOrUpdateUser(String openid, String unionid, String nickname, String avatar);
    
    boolean updateUserInfo(Long userId, String nickname, String avatar, String phone);
    
    String generateInviteCode(Long userId);
    
    boolean handleUserInvite(Long inviteeId, String inviteCode);
    
    User findByInviteCode(String inviteCode);
}
